import Vue from "vue";
import Router from "vue-router";

Vue.use(Router);

const router = new Router({
  mode: "history"
});

router.customBeforeEach = function(to, from, next, configRouter) {
  next();
};

router.customAfterEach = function(to) {
  window.scrollTo(0, 0);
};

export default router;
